import requests from '@/utils/request'

// 市场热度(主力合约实时行情)
export const FuturesMarketHot = (indicator) => {
  return  requests({
    url: '/v1/quote/realTime/mainContract/',
    method: 'get',
    params: { indicator }
  })
}

// 指数实时行情
export const FuturesIndexQuotation = () => {
  return  requests({
    url: '/v1/quote/realTime/indexes/',
    method: 'get',
  })
}

// 指定品种实时行情
export const FutureVarietyRealTimeQuotation = (variety) => {
  return  requests({
    url: '/v1/quote/realTime/variety/',
    method: 'get',
    params: { variety }
  })
}

// 获取指定代码的日K线数据
export const SymbolDailyCandle = (symbol, start, end) => {
  return  requests({
    url: '/v1/quote/sequence/candle/',
    method: 'get',
    params: { symbol, start, end }
  })
}

// 基差表
export const FuturesSpotbasic = (start=null, end=null, code=null) => {
  return  requests({
    url: '/v1/quote/futures/spotBasic/',
    method: 'get',
    params: { start, end, code }
  })
}

// 净持仓
export const FuturesPosition = (start=null, end=null, code=null) => {
  return  requests({
    url: '/v1/quote/futures/position/',
    method: 'get',
    params: { start, end, code }
  })
}